package com.yxjx.duoxue.payment;

import android.os.Bundle;

import com.yxjx.duoxue.BaseActionBarActivity;
import com.yxjx.duoxue.R;
import com.yxjx.duoxue.Yx;
import com.yxjx.duoxue.datamodel.course.DMCourse;

public class ProductSelectionActivity extends BaseActionBarActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.fragment_products_selection_list);
		customizeActionBarTitle("优惠套餐");
		
		Object extraObject = getIntent().getExtras().get(Yx.KEY_COURSE_OBJECT);
		if (extraObject == null) {
			finish();
		}
		DMCourse course = (DMCourse) extraObject;
		
		CourseProductsView products = (CourseProductsView) findViewById(R.id.course_products);
		products.setData(course.getProducts(), false);
	}

}
